<template>
    <div>
        <span class="button" @click="handleOpen">[报告成果示例]</span>
    </div>
</template>

<script setup>
const router = useRouter()

const props = defineProps({
  type: {
    type: String,
    default: '1',
  },
});

function handleOpen() {
    const url = router.resolve({
	    path: '/report',
        query:{
         type:props.type,
        }
	 });
	// 打开新窗口
	window.open(url.href);
}
</script>

<style scoped lang="scss">
.button {
    width: 100%;
    cursor: pointer;
}

.btn {
    display: inline-block;
    padding: 5px;
    border-radius: 3px;
    border: 1px solid #333;
}
</style>

